import http from './index'

export const registerApi = (username, password) => http({
  url: '/users/register',
  method: 'POST',
  data: {
    username,
    password
  }
})

export const checkUserApi = (username) => http({
  url: '/users/check',
  method: 'GET',
  params: {
    username
  }
})

export const loginApi = (username, password) => http({
  url: '/users/login',
  method: 'POST',
  data: {
    username,
    password
  }
})